package com.happy.study.controller;

import com.happy.study.entity.FeedEntity;
import com.happy.study.servier.IFeedService;
import com.happy.study.util.ResultBody;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping ("/feed")
public class FeedController {

    @Resource
    private IFeedService iFeedService;

    @RequestMapping ("/addSingle")
    public ResultBody<FeedEntity> addSingle ( FeedEntity feedEntity ) {
        feedEntity = iFeedService.addSingle ( feedEntity );
        return ResultBody.success ( feedEntity );
    }
}
